﻿<controls:ChildWindow xmlns:my1="clr-namespace:LiveTiss.Guias.UserControls"  xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"  
           xmlns:my="clr-namespace:Silverlight.InputCtrl;assembly=Silverlight.InputCtrl"  
           x:Class="LiveTiss.Telas.ConfigChildWindow"
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
           xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
           xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
           Title="Configurações" Width="578" Height="555" x:Name="config"
           xmlns:converter="clr-namespace:LiveTiss.Classes.TypeConverter">
    
    <controls:ChildWindow.Resources>
        <converter:ByteToImageConverter x:Key="byteToImageConverter" />
        <converter:BoolToVisibilityConverter x:Key="boolToVisibilityConverter" />
        <converter:NullToBoolConverter x:Key="nullToBoolConverter" />
        <converter:StringConverter x:Key="stringConverter" />
    </controls:ChildWindow.Resources>
    
    <Grid x:Name="LayoutRoot">
        <controls:TabControl BorderBrush="#FFA3AEB9">
            <controls:TabItem Header="Meus Dados" Height="24" VerticalAlignment="Bottom">
                <Grid BindingValidationError="meusDados_BindingValidationError">
                    <Grid.Background>
                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                            <GradientStop Color="#FFF9FFFF" Offset="0"/>
                            <GradientStop Color="#FF86B8B6" Offset="1"/>
                        </LinearGradientBrush>
                    </Grid.Background>
                    <Button x:Name="btnMeusDadosSalvar" Content="Salvar" Height="26" Margin="22,0,0,19" VerticalAlignment="Bottom" Cursor="Hand" Style="{StaticResource BotaoLogin}" Background="#FF3CB8B3" FontFamily="Segoe UI Semibold" FontSize="13.333" Foreground="#FF004B48" Width="75" HorizontalAlignment="Left"
                            Click="btnMeusDadosSalvar_Click" IsEnabled="{Binding Path=MeusDadosNoErrors, ElementName=config, Mode=OneWay}" TabIndex="20">
                        <Button.BorderBrush>
                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                <GradientStop Color="White" Offset="0"/>
                                <GradientStop Color="#FF3CB8B3" Offset="0.461"/>
                                <GradientStop Color="#FF177470" Offset="1"/>
                            </LinearGradientBrush>
                        </Button.BorderBrush>
                    </Button>
                    <Button x:Name="btnMeusDadosCancelar" Content="Cancelar" Height="26" Margin="122,0,0,19" VerticalAlignment="Bottom" Cursor="Hand" Style="{StaticResource BotaoLogin}" Background="#FF3CB8B3" FontFamily="Segoe UI Semibold" FontSize="13.333" Foreground="#FF004B48" HorizontalAlignment="Left" Width="75"
                            Click="btnMeusDadosCancelar_Click" TabIndex="21">
                        <Button.BorderBrush>
                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                <GradientStop Color="White" Offset="0"/>
                                <GradientStop Color="#FF3CB8B3" Offset="0.461"/>
                                <GradientStop Color="#FF177470" Offset="1"/>
                            </LinearGradientBrush>
                        </Button.BorderBrush>
                    </Button>
                    <ScrollViewer Margin="8,33,0,64" Width="331" HorizontalAlignment="Left">
                        <Canvas Height="488">
                            <Canvas Height="355" Canvas.Left="1" Canvas.Top="133" Width="328">
                                <TextBlock Height="15" TextWrapping="Wrap" Text="Nome" Width="106"/>
                                <TextBox Height="23" Canvas.Top="16" Width="290" MaxLength="70" TabIndex="4"
                                        Text="{Binding Path=Prestador.Nome, ElementName=config, ValidatesOnDataErrors=True, NotifyOnValidationError=True, Mode=TwoWay}"/>
                                <TextBlock Height="15" TextWrapping="Wrap" Text="Tipo Logradouro" Width="106" Canvas.Top="46"/>
                                <TextBlock Height="15" TextWrapping="Wrap" Text="Logradouro" Width="106" Canvas.Left="121" Canvas.Top="46"/>
                                <TextBox Height="23" Canvas.Left="121" Canvas.Top="62" Width="169" MaxLength="40" TabIndex="6"
                                        Text="{Binding Path=Prestador.Logradouro, ElementName=config, ValidatesOnDataErrors=True, NotifyOnValidationError=True, Mode=TwoWay}"/>
                                <TextBlock Height="15" TextWrapping="Wrap" Text="Complemento" Width="105" Canvas.Left="84" Canvas.Top="92"/>
                                <TextBox Height="23" Width="105" Canvas.Left="84" Canvas.Top="108" MaxLength="15" TabIndex="8"
                                        Text="{Binding Path=Prestador.Complemento, ElementName=config, ValidatesOnDataErrors=True, NotifyOnValidationError=True, Mode=TwoWay}"/>
                                <TextBlock Height="15" TextWrapping="Wrap" Text="CEP" Canvas.Left="204" Canvas.Top="92" Width="210"/>
                                <TextBox Height="23" Canvas.Left="204" Canvas.Top="108" Width="86" MaxLength="8" TabIndex="9"
                                        Text="{Binding Path=Prestador.CEP, ElementName=config, ValidatesOnDataErrors=True, NotifyOnValidationError=True, Mode=TwoWay}"/>
                                <TextBlock TextWrapping="Wrap" Text="Código IBGE" Width="80" Height="15" Canvas.Top="138"/>
                                <TextBox Height="23" Width="69" Canvas.Top="154" MaxLength="7" TabIndex="10"
                                        Text="{Binding Path=Prestador.CodigoIBGE, ElementName=config, ValidatesOnDataErrors=True, NotifyOnValidationError=True, Mode=TwoWay}"/>
                                <TextBlock Height="15" TextWrapping="Wrap" Text="Tipo de Prestador" Width="210" Canvas.Top="192"/>
                                <ComboBox Height="26" Width="106" Canvas.Top="61" SelectedValue="Key" DisplayMemberPath="Value" ItemsSource="{Binding Path=Prestador.tipoLogradouroItems, ElementName=config, Mode=OneWay}" TabIndex="5"
                                    SelectedIndex="{Binding Path=Prestador.TipoLogradouro, ElementName=config,Converter={StaticResource stringConverter}, ConverterParameter='TipoLogradouro', BindsDirectlyToSource=True, Mode=TwoWay}"/>
                                <TextBlock Height="15" TextWrapping="Wrap" Text="Número" Width="69" Canvas.Top="92"/>
                                <TextBox Height="23" Width="69" Canvas.Top="108" MaxLength="5" TabIndex="7"
                                        Text="{Binding Path=Prestador.Numero, ElementName=config, ValidatesOnDataErrors=True, NotifyOnValidationError=True, Mode=TwoWay}"/>
                                <TextBlock TextWrapping="Wrap" Text="Município" Height="15" Width="139" Canvas.Left="84" Canvas.Top="138"/>
                                <TextBox Height="23" Width="105" Canvas.Left="84" Canvas.Top="154" MaxLength="40" TabIndex="11"
                                        Text="{Binding Path=Prestador.Municipio, ElementName=config, ValidatesOnDataErrors=True, NotifyOnValidationError=True, Mode=TwoWay}"/>
                                <TextBlock Height="15" TextWrapping="Wrap" Text="UF" Canvas.Left="204" Canvas.Top="138" Width="106"/>
                                <ComboBox Height="26" Canvas.Left="204" Canvas.Top="153" Width="86" SelectedValue="Key" DisplayMemberPath="Value" ItemsSource="{Binding Path=Prestador.ufItems, ElementName=config, Mode=OneWay}" TabIndex="12"
                                    SelectedIndex="{Binding Path=Prestador.CodigoUF, ElementName=config,Converter={StaticResource stringConverter}, ConverterParameter='UF', BindsDirectlyToSource=True, Mode=TwoWay}"/>
                                <RadioButton x:Name="rdbMeusDadosProfissional" Content="Profissional" Height="18" Width="93" Canvas.Left="8" Canvas.Top="214" IsEnabled="False" TabIndex="13"
                                             IsChecked="{Binding ElementName=config, Path=Prestador.ProfissionalPrestador, Converter={StaticResource nullToBoolConverter}}" />
                                <RadioButton x:Name="rdbMeusDadosHospital" Content="Hospital / Clínica" Height="18" Width="122" Canvas.Left="117" Canvas.Top="214" IsEnabled="False"
                                             IsChecked="{Binding ElementName=config, Path=Prestador.ClinicaPrestador, Converter={StaticResource nullToBoolConverter}}" TabIndex="14"/>
                                <Canvas Height="89" Canvas.Top="242" Width="290" Visibility="{Binding ElementName=rdbMeusDadosProfissional, Path=IsChecked, Converter={StaticResource boolToVisibilityConverter}}">
                                    <TextBlock TextWrapping="Wrap" Text="CPF / CPNJ" Height="15" Width="84"/>
                                    <TextBox Text="{Binding ElementName=config, Path=Prestador.ProfissionalPrestador.CPF, ValidatesOnDataErrors=True, NotifyOnValidationError=True, Mode=TwoWay}" MaxLength="14" Height="23" Width="133" Canvas.Top="16" TabIndex="15"/>
                                    <TextBlock Height="15" TextWrapping="Wrap" Text="CBOS" Width="106" Canvas.Left="149"/>
                                    <ComboBox Height="26" Width="141" Canvas.Left="149" Canvas.Top="16" SelectedValue="Key" DisplayMemberPath="Value" ItemsSource="{Binding Path=Prestador.ProfissionalPrestador.CBOSItens, ElementName=config, Mode=OneWay}" TabIndex="16"
                                        SelectedIndex="{Binding Path=Prestador.ProfissionalPrestador.CBOS, ElementName=config,Converter={StaticResource stringConverter}, ConverterParameter='CBOS', BindsDirectlyToSource=True, Mode=TwoWay}"/>
                                    <TextBlock Height="15" TextWrapping="Wrap" Text="Sigla Conselho" Width="106" Canvas.Top="47"/>
                                    <ComboBox Height="26" Width="84" Canvas.Top="63" SelectedValue="Key" DisplayMemberPath="Value" ItemsSource="{Binding Path=Prestador.ProfissionalPrestador.conselhoProfissionalItems, ElementName=config, Mode=OneWay}" TabIndex="17"
                                        SelectedIndex="{Binding Path=Prestador.ProfissionalPrestador.SiglaConselho, ElementName=config,Converter={StaticResource stringConverter}, ConverterParameter='ConselhoProfissional', BindsDirectlyToSource=True, Mode=TwoWay}"/>
                                    <TextBlock TextWrapping="Wrap" Text="Nº Conselho" Height="15" Canvas.Top="47" Width="84" Canvas.Left="99"/>
                                    <TextBox Text="{Binding ElementName=config, Path=Prestador.ProfissionalPrestador.NumeroConselho, ValidatesOnDataErrors=True, NotifyOnValidationError=True, Mode=TwoWay}" MaxLength="15" Height="23" Width="84" Canvas.Top="63" Canvas.Left="99" TabIndex="18"/>
                                    <TextBlock Height="15" TextWrapping="Wrap" Text="UF Conselho" Width="106" Canvas.Left="199" Canvas.Top="47"/>
                                    <ComboBox Height="26" Width="91" Canvas.Left="199" Canvas.Top="63" SelectedValue="Key" DisplayMemberPath="Value" ItemsSource="{Binding Path=Prestador.ProfissionalPrestador.ufItems, ElementName=config, Mode=OneWay}" TabIndex="19"
                                        SelectedIndex="{Binding Path=Prestador.ProfissionalPrestador.UFConselho, ElementName=config,Converter={StaticResource stringConverter}, ConverterParameter='UF', BindsDirectlyToSource=True, Mode=TwoWay}"/>
                                </Canvas>
                                <Canvas Height="89" Canvas.Top="242" Width="290" Visibility="{Binding ElementName=rdbMeusDadosHospital, Path=IsChecked, Converter={StaticResource boolToVisibilityConverter}}">
                                    <TextBlock TextWrapping="Wrap" Text="CNES" Height="15" Width="84"/>
                                    <TextBox Text="{Binding ElementName=config, Path=Prestador.ClinicaPrestador.CNES, ValidatesOnDataErrors=True, NotifyOnValidationError=True, Mode=TwoWay}" MaxLength="7" Height="23" Width="140" Canvas.Top="16"/>
                                    <TextBlock TextWrapping="Wrap" Text="CNPJ" Height="15" Canvas.Top="47" Width="84"/>
                                    <TextBox Text="{Binding ElementName=config, Path=Prestador.ClinicaPrestador.CNPJ, ValidatesOnDataErrors=True, NotifyOnValidationError=True, Mode=TwoWay}" MaxLength="14" Height="23" Width="140" Canvas.Top="63"/>
                                </Canvas>
                            </Canvas>
                            <Canvas Height="118" Width="125">
                                <TextBlock TextWrapping="Wrap" Text="Senha" Width="126" Height="15" Canvas.Left="1" Canvas.Top="46"/>
                                <TextBox x:Name="txtSenha" Height="23" Width="126" Canvas.Left="1" Canvas.Top="62" LostFocus="txtSenha_LostFocus" TabIndex="1"
                                        Text="{Binding Path=Prestador.LoginPrestador.SenhaNova, ElementName=config, Mode=TwoWay, ValidatesOnDataErrors=True, NotifyOnValidationError=True}"/>
                                <TextBlock Height="15" TextWrapping="Wrap" Text="Login" Width="69" Canvas.Left="1"/>
                                <TextBox Height="23" Width="126" Canvas.Left="1" Canvas.Top="16" IsEnabled="False" TabIndex="0"
                                        Text="{Binding Path=Prestador.LoginPrestador.Usuario, ElementName=config, Mode=TwoWay, ValidatesOnDataErrors=True, NotifyOnValidationError=True}"/>
                                <CheckBox Content="Administrador" Height="25" Width="138" Canvas.Top="93" IsChecked="{Binding Path=Prestador.LoginPrestador.IsAdministrator, ElementName=config}" IsEnabled="False" TabIndex="3"/>
                                <TextBox x:Name="txtSenhaConfirma" Canvas.Left="165" Canvas.Top="62" Height="23" Width="126" LostFocus="txtSenhaConfirma_LostFocus" TabIndex="2"
                                        Text="{Binding Path=Prestador.LoginPrestador.SenhaConfirma, ElementName=config, Mode=TwoWay, ValidatesOnDataErrors=True, NotifyOnValidationError=True}"/>
                                <TextBlock Canvas.Left="165" Canvas.Top="46" Height="15" Text="Confirma senha" TextWrapping="Wrap" Width="126" />
                            </Canvas>
                        </Canvas>
                    </ScrollViewer>
                </Grid>
            </controls:TabItem>
            <controls:TabItem Header="Operadoras">
                <Grid OpacityMask="Black" BindingValidationError="operadoras_BindingValidationError">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="23" />
                        <ColumnDefinition Width="525" />
                    </Grid.ColumnDefinitions>
                    <Grid.Background>
                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                            <GradientStop Color="#FFF9FFFF" Offset="0"/>
                            <GradientStop Color="#FF86B8B6" Offset="1"/>
                        </LinearGradientBrush>
                    </Grid.Background>
                    <Button x:Name="btnSalvar" Content="Salvar" Height="26" Margin="22,0,0,19" VerticalAlignment="Bottom" Cursor="Hand" Style="{StaticResource BotaoLogin}" Background="#FF3CB8B3" FontFamily="Segoe UI Semibold" FontSize="13.333" Foreground="#FF004B48" Width="75" HorizontalAlignment="Left" Click="btnSalvar_Click"
                            IsEnabled="{Binding Path=OperadoraNoErrors, ElementName=config, Mode=OneWay}" Grid.ColumnSpan="2" TabIndex="4">
                        <Button.BorderBrush>
                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                <GradientStop Color="White" Offset="0"/>
                                <GradientStop Color="#FF3CB8B3" Offset="0.461"/>
                                <GradientStop Color="#FF177470" Offset="1"/>
                            </LinearGradientBrush>
                        </Button.BorderBrush>
                    </Button>
                    <Button x:Name="btnCancelar" Content="Cancelar" Height="26" Margin="99,0,0,19" VerticalAlignment="Bottom" Cursor="Hand" Style="{StaticResource BotaoLogin}" Background="#FF3CB8B3" FontFamily="Segoe UI Semibold" FontSize="13.333" Foreground="#FF004B48" Width="75" HorizontalAlignment="Left" Click="btnCancelar_Click"
                            IsEnabled="{Binding Path=OperadoraEnabled, ElementName=config, Mode=OneWay}" Grid.Column="1" TabIndex="5">
                        <Button.BorderBrush>
                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                <GradientStop Color="White" Offset="0"/>
                                <GradientStop Color="#FF3CB8B3" Offset="0.461"/>
                                <GradientStop Color="#FF177470" Offset="1"/>
                            </LinearGradientBrush>
                        </Button.BorderBrush>
                    </Button>
                    <Button x:Name="btnExcluir" Content="Excluir" Height="26" Margin="200,0,250,19" VerticalAlignment="Bottom" Cursor="Hand" Style="{StaticResource BotaoLogin}" Background="#FF3CB8B3" FontFamily="Segoe UI Semibold" FontSize="13.333" Foreground="#FF004B48" Click="btnExcluir_Click"
                            IsEnabled="{Binding Path=OperadoraEnabled, ElementName=config, Mode=OneWay}" Grid.Column="1" TabIndex="6">
                        <Button.BorderBrush>
                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                <GradientStop Color="White" Offset="0"/>
                                <GradientStop Color="#FF3CB8B3" Offset="0.461"/>
                                <GradientStop Color="#FF177470" Offset="1"/>
                            </LinearGradientBrush>
                        </Button.BorderBrush>
                    </Button>
                    <TextBlock x:Name="RegistroANS" HorizontalAlignment="Left" Height="15" Margin="14,60,0,0" TextWrapping="Wrap" Text="Registro ANS" VerticalAlignment="Top" Width="106" Grid.ColumnSpan="2" />

                    <TextBox x:Name="txtRegistroANS" Text="{Binding Path=Operadora.RegistroANS, ElementName=config, Mode=TwoWay, ValidatesOnDataErrors=True, NotifyOnValidationError=True}" HorizontalAlignment="Left" VerticalAlignment="Top" Width="106" Height="23" Margin="14,76,0,0"
                             IsEnabled="{Binding Path=IsNewOperadora, ElementName=config, Mode=OneWay}" MaxLength="7" Grid.ColumnSpan="2" TabIndex="1" />
                    <TextBlock x:Name="Nome" HorizontalAlignment="Left" Height="15" Margin="14,105,0,0" TextWrapping="Wrap" Text="Nome" VerticalAlignment="Top" Width="106" Grid.ColumnSpan="2" />
                    <TextBox Text="{Binding Path=Operadora.Nome, ElementName=config, Mode=TwoWay, ValidatesOnDataErrors=True, NotifyOnValidationError=True}" Height="23" Margin="14,121,244,0" VerticalAlignment="Top"
                             IsEnabled="{Binding Path=OperadoraEnabled, ElementName=config, Mode=OneWay}" Grid.ColumnSpan="2" TabIndex="2" />
                    <ListBox x:Name="lbxOperadora" ItemsSource="{Binding Path=Operadoras, ElementName=config, Mode=OneWay}" DisplayMemberPath="Nome" HorizontalAlignment="Right" Width="183" Margin="0,26,24,19" SelectionChanged="operadoras_SelectionChanged" Grid.Column="1" TabIndex="7"/>
                    <TextBlock x:Name="OperadorasCadastradas" HorizontalAlignment="Right" Height="14" Margin="0,8,59,0" TextWrapping="Wrap" Text="Operadoras Cadastradas" VerticalAlignment="Top" Width="148" Grid.Column="1" />
                    <Button Background="#FF3CB8B3" Content="Logotipo" Cursor="Hand" FontFamily="Segoe UI Semibold" FontSize="13.333" Foreground="#FF004B48" Height="29" HorizontalAlignment="Left" Margin="99,0,0,122" Name="btnLogotipo" 
                            Style="{StaticResource BotaoLogin}" VerticalAlignment="Bottom" Width="75" Click="btnLogotipo_Click" IsEnabled="{Binding Path=OperadoraEnabled, ElementName=config, Mode=OneWay}" Grid.Column="1" TabIndex="3">
                        <Button.BorderBrush>
                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                <GradientStop Color="White" Offset="0" />
                                <GradientStop Color="#FF3CB8B3" Offset="0.461" />
                                <GradientStop Color="#FF177470" Offset="1" />
                            </LinearGradientBrush>
                        </Button.BorderBrush>
                    </Button>
                    <Image Source="{Binding Path=Operadora.Logo, ElementName=config,Converter={StaticResource byteToImageConverter}, Mode=OneWay, TargetNullValue='/LiveTiss;component/Content/SemLogotipo.png'}" 
                           Height="150" HorizontalAlignment="Left" Margin="38,163,0,0" Stretch="Uniform" VerticalAlignment="Top" Width="200" Grid.Column="1" />
                    <Button Background="#FF3CB8B3" Content="Novo" Cursor="Hand" FontFamily="Segoe UI Semibold" FontSize="13.333" Foreground="#FF004B48" Height="26" HorizontalAlignment="Left" 
                            Margin="22,0,0,448" Name="btnNovo" Click="btnNovo_Click" Style="{StaticResource BotaoLogin}" VerticalAlignment="Bottom" Width="75" Grid.ColumnSpan="2" TabIndex="0">
                        <Button.BorderBrush>
                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                <GradientStop Color="White" Offset="0" />
                                <GradientStop Color="#FF3CB8B3" Offset="0.461" />
                                <GradientStop Color="#FF177470" Offset="1" />
                            </LinearGradientBrush>
                        </Button.BorderBrush>
                    </Button>
                    <Path Data="M323,0 L323,482" Fill="White" HorizontalAlignment="Right" Margin="0,10.502,231,6.497" Stretch="Fill" Stroke="White" UseLayoutRounding="False" Width="1" Opacity="0.475" Height="443" Grid.ColumnSpan="2"/>
                </Grid>
            </controls:TabItem>
            <controls:TabItem Header="Prestadores" Visibility="{Binding Path=Prestador.LoginPrestador.IsAdministrator, ElementName=config,Converter={StaticResource boolToVisibilityConverter}, Mode=OneWay}">
                <Grid BindingValidationError="prestador_BindingValidationError">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="0.33*"/>
                        <ColumnDefinition Width="0.67*"/>
                    </Grid.ColumnDefinitions>
                    <Grid.Background>
                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                            <GradientStop Color="#FFF9FFFF" Offset="0"/>
                            <GradientStop Color="#FF86B8B6" Offset="1"/>
                        </LinearGradientBrush>
                    </Grid.Background>
                    <Button x:Name="btnPrestadorSalvar" Content="Salvar" Height="26" Margin="22,0,84,19" VerticalAlignment="Bottom" Cursor="Hand" Style="{StaticResource BotaoLogin}" Background="#FF3CB8B3" FontFamily="Segoe UI Semibold" FontSize="13.333" Foreground="#FF004B48"
                            Click="btnPrestadorSalvar_Click" IsEnabled="{Binding Path=PrestadorNoErrors, ElementName=config, Mode=OneWay}" TabIndex="23">
                        <Button.BorderBrush>
                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                <GradientStop Color="White" Offset="0"/>
                                <GradientStop Color="#FF3CB8B3" Offset="0.461"/>
                                <GradientStop Color="#FF177470" Offset="1"/>
                            </LinearGradientBrush>
                        </Button.BorderBrush>
                    </Button>
                    <Button x:Name="btnPrestadorCancelar" Content="Cancelar" Height="26" Margin="0,0,-16,19" VerticalAlignment="Bottom" Cursor="Hand" Style="{StaticResource BotaoLogin}" Background="#FF3CB8B3" FontFamily="Segoe UI Semibold" FontSize="13.333" Foreground="#FF004B48" Width="75" HorizontalAlignment="Right"
                            Click="btnPrestadorCancelar_Click" IsEnabled="{Binding Path=PrestadorEnabled, ElementName=config, Mode=OneWay}" TabIndex="24">
                        <Button.BorderBrush>
                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                <GradientStop Color="White" Offset="0"/>
                                <GradientStop Color="#FF3CB8B3" Offset="0.461"/>
                                <GradientStop Color="#FF177470" Offset="1"/>
                            </LinearGradientBrush>
                        </Button.BorderBrush>
                    </Button>
                    <Button x:Name="btnPrestadorExcluir" Content="Excluir" Height="26" Margin="42,0,0,19" VerticalAlignment="Bottom" Cursor="Hand" Style="{StaticResource BotaoLogin}" Background="#FF3CB8B3" FontFamily="Segoe UI Semibold" FontSize="13.333" Foreground="#FF004B48" Grid.Column="1" HorizontalAlignment="Left" Width="75"
                            Click="btnPrestadorExcluir_Click" IsEnabled="{Binding Path=PrestadorEnabled, ElementName=config, Mode=OneWay}" TabIndex="25">
                        <Button.BorderBrush>
                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                <GradientStop Color="White" Offset="0"/>
                                <GradientStop Color="#FF3CB8B3" Offset="0.461"/>
                                <GradientStop Color="#FF177470" Offset="1"/>
                            </LinearGradientBrush>
                        </Button.BorderBrush>
                    </Button>
                    <TextBlock Height="14" Margin="160,8,59,0" TextWrapping="Wrap" Text="Prestadores Cadastrados" VerticalAlignment="Top" Grid.Column="1"/>
                    <ListBox x:Name="lbxPrestador" ItemsSource="{Binding Path=Prestadores, ElementName=config, Mode=OneWay}" DisplayMemberPath="Nome" HorizontalAlignment="Right" Margin="0,26,24,19" Width="183" Grid.Column="1"
                             SelectionChanged="lbxPrestador_SelectionChanged" TabIndex="26"/>
                    <ScrollViewer Margin="8,33,-156,64">
                        <Canvas Height="488">
                            <Canvas Height="355" Canvas.Left="1" Canvas.Top="133" Width="328">
                                <TextBlock Height="15" TextWrapping="Wrap" Text="Nome" Width="106"/>
                                <TextBox Height="23" Canvas.Top="16" Width="290" MaxLength="70" IsEnabled="{Binding Path=PrestadorEnabled, ElementName=config, Mode=OneWay}"
                                        Text="{Binding Path=PrestadorSelecionado.Nome, ElementName=config, ValidatesOnDataErrors=True, NotifyOnValidationError=True, Mode=TwoWay}" TabIndex="5"/>
                                <TextBlock Height="15" TextWrapping="Wrap" Text="Tipo Logradouro" Width="106" Canvas.Top="46"/>
                                <TextBlock Height="15" TextWrapping="Wrap" Text="Logradouro" Width="106" Canvas.Left="121" Canvas.Top="46"/>
                                <TextBox Height="23" Canvas.Left="121" Canvas.Top="62" Width="169" MaxLength="40" IsEnabled="{Binding Path=PrestadorEnabled, ElementName=config, Mode=OneWay}"
                                        Text="{Binding Path=PrestadorSelecionado.Logradouro, ElementName=config, ValidatesOnDataErrors=True, NotifyOnValidationError=True, Mode=TwoWay}" TabIndex="7"/>
                                <TextBlock Height="15" TextWrapping="Wrap" Text="Complemento" Width="105" Canvas.Left="84" Canvas.Top="92"/>
                                <TextBox Height="23" Width="105" Canvas.Left="84" Canvas.Top="108" MaxLength="15" IsEnabled="{Binding Path=PrestadorEnabled, ElementName=config, Mode=OneWay}"
                                        Text="{Binding Path=PrestadorSelecionado.Complemento, ElementName=config, ValidatesOnDataErrors=True, NotifyOnValidationError=True, Mode=TwoWay}" TabIndex="9"/>
                                <TextBlock Height="15" TextWrapping="Wrap" Text="CEP" Canvas.Left="204" Canvas.Top="92" Width="210"/>
                                <TextBox Height="23" Canvas.Left="204" Canvas.Top="108" Width="86" MaxLength="8" IsEnabled="{Binding Path=PrestadorEnabled, ElementName=config, Mode=OneWay}"
                                        Text="{Binding Path=PrestadorSelecionado.CEP, ElementName=config, ValidatesOnDataErrors=True, NotifyOnValidationError=True, Mode=TwoWay}" TabIndex="10"/>
                                <TextBlock TextWrapping="Wrap" Text="Código IBGE" Width="80" Height="15" Canvas.Top="138"/>
                                <TextBox Height="23" Width="69" Canvas.Top="154" MaxLength="7" IsEnabled="{Binding Path=PrestadorEnabled, ElementName=config, Mode=OneWay}"
                                        Text="{Binding Path=PrestadorSelecionado.CodigoIBGE, ElementName=config, ValidatesOnDataErrors=True, NotifyOnValidationError=True, Mode=TwoWay}" TabIndex="11"/>
                                <TextBlock Height="15" TextWrapping="Wrap" Text="Tipo de Prestador" Width="210" Canvas.Top="192"/>
                                <ComboBox Height="26" Width="106" Canvas.Top="61" SelectedValue="Key" DisplayMemberPath="Value" ItemsSource="{Binding Path=PrestadorSelecionado.tipoLogradouroItems, ElementName=config, Mode=OneWay}"
                                          SelectedIndex="{Binding Path=PrestadorSelecionado.TipoLogradouro, ElementName=config,Converter={StaticResource stringConverter}, ConverterParameter='TipoLogradouro', BindsDirectlyToSource=True, Mode=TwoWay}"
                                          IsEnabled="{Binding Path=PrestadorEnabled, ElementName=config, Mode=OneWay}" TabIndex="6"/>
                                <TextBlock Height="15" TextWrapping="Wrap" Text="Número" Width="69" Canvas.Top="92"/>
                                <TextBox Height="23" Width="69" Canvas.Top="108" MaxLength="5" IsEnabled="{Binding Path=PrestadorEnabled, ElementName=config, Mode=OneWay}" TabIndex="8"
                                        Text="{Binding Path=PrestadorSelecionado.Numero, ElementName=config, ValidatesOnDataErrors=True, NotifyOnValidationError=True, Mode=TwoWay}"/>
                                <TextBlock TextWrapping="Wrap" Text="Município" Height="15" Width="139" Canvas.Left="84" Canvas.Top="138"/>
                                <TextBox Height="23" Width="105" Canvas.Left="84" Canvas.Top="154" MaxLength="40" IsEnabled="{Binding Path=PrestadorEnabled, ElementName=config, Mode=OneWay}" TabIndex="12"
                                        Text="{Binding Path=PrestadorSelecionado.Municipio, ElementName=config, ValidatesOnDataErrors=True, NotifyOnValidationError=True, Mode=TwoWay}"/>
                                <TextBlock Height="15" TextWrapping="Wrap" Text="UF" Canvas.Left="204" Canvas.Top="138" Width="106"/>
                                <ComboBox Height="26" Canvas.Left="204" Canvas.Top="153" Width="86" SelectedValue="Key" DisplayMemberPath="Value" ItemsSource="{Binding Path=PrestadorSelecionado.ufItems, ElementName=config, Mode=OneWay}"
                                    SelectedIndex="{Binding Path=PrestadorSelecionado.CodigoUF, ElementName=config,Converter={StaticResource stringConverter}, ConverterParameter='UF', BindsDirectlyToSource=True, Mode=TwoWay}"
                                    IsEnabled="{Binding Path=PrestadorEnabled, ElementName=config, Mode=OneWay}" TabIndex="13"/>
                                <RadioButton x:Name="rdbPrestadorProfissional" Content="Profissional" Height="18" Width="93" Canvas.Left="8" Canvas.Top="214" 
                                             IsEnabled="{Binding Path=IsNewPrestador, ElementName=config, Mode=OneWay}" IsChecked="True"
                                             Click="rdbPrestadorProfissional_Click" TabIndex="14"/>
                                <RadioButton x:Name="rdbPrestadorHospital" Content="Hospital / Clínica" Height="18" Width="122" Canvas.Left="117" Canvas.Top="214"
                                             IsEnabled="{Binding Path=IsNewPrestador, ElementName=config, Mode=OneWay}"
                                             Click="rdbPrestadorHospital_Click" TabIndex="15"/>
                                <Canvas Height="89" Canvas.Top="242" Width="290" Visibility="{Binding ElementName=rdbPrestadorProfissional, Path=IsChecked, Converter={StaticResource boolToVisibilityConverter}}">
                                    <TextBlock TextWrapping="Wrap" Text="CPF / CPNJ" Height="15" Width="84"/>
                                    <TextBox Text="{Binding ElementName=config, Path=PrestadorSelecionado.ProfissionalPrestador.CPF, ValidatesOnDataErrors=True, NotifyOnValidationError=True, Mode=TwoWay}" MaxLength="14" Height="23" Width="133" Canvas.Top="16"
                                             IsEnabled="{Binding Path=PrestadorEnabled, ElementName=config, Mode=OneWay}" TabIndex="16"/>
                                    <TextBlock Height="15" TextWrapping="Wrap" Text="CBOS" Width="106" Canvas.Left="149"/>
                                    <ComboBox Height="26" Width="141" Canvas.Left="149" Canvas.Top="16" SelectedValue="Key" DisplayMemberPath="Value" ItemsSource="{Binding Path=PrestadorSelecionado.ProfissionalPrestador.CBOSItens, ElementName=config, Mode=OneWay}"
                                        SelectedIndex="{Binding Path=PrestadorSelecionado.ProfissionalPrestador.CBOS, ElementName=config,Converter={StaticResource stringConverter}, ConverterParameter='CBOS', BindsDirectlyToSource=True, Mode=TwoWay}"
                                        IsEnabled="{Binding Path=PrestadorEnabled, ElementName=config, Mode=OneWay}" TabIndex="17"/>
                                    <TextBlock Height="15" TextWrapping="Wrap" Text="Sigla Conselho" Width="106" Canvas.Top="47"/>
                                    <ComboBox Height="26" Width="84" Canvas.Top="63" SelectedValue="Key" DisplayMemberPath="Value" ItemsSource="{Binding Path=PrestadorSelecionado.ProfissionalPrestador.conselhoProfissionalItems, ElementName=config, Mode=OneWay}"
                                        SelectedIndex="{Binding Path=PrestadorSelecionado.ProfissionalPrestador.SiglaConselho, ElementName=config,Converter={StaticResource stringConverter}, ConverterParameter='ConselhoProfissional', BindsDirectlyToSource=True, Mode=TwoWay}"
                                        IsEnabled="{Binding Path=PrestadorEnabled, ElementName=config, Mode=OneWay}" TabIndex="18"/>
                                    <TextBlock TextWrapping="Wrap" Text="Nº Conselho" Height="15" Canvas.Top="47" Width="84" Canvas.Left="99"/>
                                    <TextBox Text="{Binding ElementName=config, Path=PrestadorSelecionado.ProfissionalPrestador.NumeroConselho, ValidatesOnDataErrors=True, NotifyOnValidationError=True, Mode=TwoWay}" MaxLength="15" Height="23" Width="84" Canvas.Top="63" Canvas.Left="99"
                                             IsEnabled="{Binding Path=PrestadorEnabled, ElementName=config, Mode=OneWay}" TabIndex="19"/>
                                    <TextBlock Height="15" TextWrapping="Wrap" Text="UF Conselho" Width="106" Canvas.Left="199" Canvas.Top="47"/>
                                    <ComboBox Height="26" Width="91" Canvas.Left="199" Canvas.Top="63" SelectedValue="Key" DisplayMemberPath="Value" ItemsSource="{Binding Path=PrestadorSelecionado.ProfissionalPrestador.ufItems, ElementName=config, Mode=OneWay}"
                                        SelectedIndex="{Binding Path=PrestadorSelecionado.ProfissionalPrestador.UFConselho, ElementName=config,Converter={StaticResource stringConverter}, ConverterParameter='UF', BindsDirectlyToSource=True, Mode=TwoWay}"
                                        IsEnabled="{Binding Path=PrestadorEnabled, ElementName=config, Mode=OneWay}" TabIndex="20"/>
                                </Canvas>
                                <Canvas Height="89" Canvas.Top="242" Width="290" Visibility="{Binding ElementName=rdbPrestadorHospital, Path=IsChecked, Converter={StaticResource boolToVisibilityConverter}}">
                                    <TextBlock TextWrapping="Wrap" Text="CNES" Height="15" Width="84"/>
                                    <TextBox Text="{Binding ElementName=config, Path=PrestadorSelecionado.ClinicaPrestador.CNES, ValidatesOnDataErrors=True, NotifyOnValidationError=True, Mode=TwoWay}" MaxLength="7" Height="23" Width="140" Canvas.Top="16"
                                             IsEnabled="{Binding Path=PrestadorEnabled, ElementName=config, Mode=OneWay}" TabIndex="21"/>
                                    <TextBlock TextWrapping="Wrap" Text="CNPJ" Height="15" Canvas.Top="47" Width="84"/>
                                    <TextBox Text="{Binding ElementName=config, Path=PrestadorSelecionado.ClinicaPrestador.CNPJ, ValidatesOnDataErrors=True, NotifyOnValidationError=True, Mode=TwoWay}" MaxLength="14" Height="23" Width="140" Canvas.Top="63"
                                             IsEnabled="{Binding Path=PrestadorEnabled, ElementName=config, Mode=OneWay}" TabIndex="22"/>
                                </Canvas>
                            </Canvas>
                            <Canvas Height="118" Width="125">
                                <TextBlock TextWrapping="Wrap" Text="Senha" Width="126" Height="15" Canvas.Left="1" Canvas.Top="46"/>
                                <TextBox x:Name="txtPrestadorSenha" Height="23" Width="126" Canvas.Left="1" Canvas.Top="62" LostFocus="txtPrestadorSenha_LostFocus" IsEnabled="{Binding Path=PrestadorEnabled, ElementName=config, Mode=OneWay}"
                                        Text="{Binding Path=PrestadorSelecionado.LoginPrestador.SenhaNova, ElementName=config, Mode=TwoWay, ValidatesOnDataErrors=True, NotifyOnValidationError=True}" TabIndex="2"/>
                                <TextBlock Height="15" TextWrapping="Wrap" Text="Login" Width="69" Canvas.Left="1"/>
                                <TextBox Height="23" Width="126" Canvas.Left="1" Canvas.Top="16" IsEnabled="{Binding Path=IsNewPrestador, ElementName=config, Mode=OneWay}" TabIndex="1"
                                        Text="{Binding Path=PrestadorSelecionado.LoginPrestador.Usuario, ElementName=config, Mode=TwoWay, ValidatesOnDataErrors=True, NotifyOnValidationError=True}"/>
                                <CheckBox Content="Administrador" Height="25" Width="138" Canvas.Top="93" IsChecked="{Binding Path=PrestadorSelecionado.LoginPrestador.IsAdministrator, ElementName=config, Mode=TwoWay}" TabIndex="4"
                                          IsEnabled="{Binding Path=PrestadorEnabled, ElementName=config, Mode=OneWay}"/>
                                <TextBox x:Name="txtPrestadorSenhaConfirma" Canvas.Left="165" Canvas.Top="62" Height="23" Width="126" LostFocus="txtPrestadorSenhaConfirma_LostFocus" IsEnabled="{Binding Path=PrestadorEnabled, ElementName=config, Mode=OneWay}"
                                        Text="{Binding Path=PrestadorSelecionado.LoginPrestador.SenhaConfirma, ElementName=config, Mode=TwoWay, ValidatesOnDataErrors=True, NotifyOnValidationError=True}" TabIndex="3"/>
                                <TextBlock Canvas.Left="165" Canvas.Top="46" Height="15" Text="Confirma senha" TextWrapping="Wrap" Width="126" />
                            </Canvas>
                        </Canvas>
                    </ScrollViewer>
                    <Button Background="#FF3CB8B3" Content="Novo" Cursor="Hand" FontFamily="Segoe UI Semibold" FontSize="13.333" Foreground="#FF004B48" Height="26" HorizontalAlignment="Left" 
                            Margin="22,0,0,448" Name="btnPrestadorNovo" Style="{StaticResource BotaoLogin}" VerticalAlignment="Bottom" Width="75" Click="btnPrestadorNovo_Click" TabIndex="0">
                        <Button.BorderBrush>
                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                <GradientStop Color="White" Offset="0" />
                                <GradientStop Color="#FF3CB8B3" Offset="0.461" />
                                <GradientStop Color="#FF177470" Offset="1" />
                            </LinearGradientBrush>
                        </Button.BorderBrush>
                    </Button>
                </Grid>
            </controls:TabItem>
            <controls:TabItem Header="Configurações">
                <Grid>
                    <Grid.Background>
                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                            <GradientStop Color="#FFF9FFFF" Offset="0"/>
                            <GradientStop Color="#FF86B8B6" Offset="1"/>
                        </LinearGradientBrush>
                    </Grid.Background>
                    <Button x:Name="btnIntervaloLoteCancelar" Content="Cancelar" Height="26" Margin="228,0,245,30" VerticalAlignment="Bottom" Cursor="Hand" Style="{StaticResource BotaoLogin}" Background="#FF3CB8B3" FontFamily="Segoe UI Semibold" FontSize="13.333" Foreground="#FF004B48"
                            IsEnabled="{Binding Path=IntervaloLote, ElementName=config, Converter={StaticResource nullToBoolConverter}, Mode=OneWay}"
                            Click="btnIntervaloLoteCancelar_Click">
                        <Button.BorderBrush>
                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                <GradientStop Color="White" Offset="0"/>
                                <GradientStop Color="#FF3CB8B3" Offset="0.461"/>
                                <GradientStop Color="#FF177470" Offset="1"/>
                            </LinearGradientBrush>
                        </Button.BorderBrush>
                    </Button>
                    <Button x:Name="btnIntervaloLoteSalvar" Background="#FF3CB8B3" Content="Salvar" Cursor="Hand" FontFamily="Segoe UI Semibold" FontSize="13.333" Foreground="#FF004B48" Height="26" 
                            IsEnabled="{Binding Path=IntervaloLoteNoErrors, ElementName=config, Mode=OneWay}" Margin="131,0,342,30" 
                            Style="{StaticResource BotaoLogin}" VerticalAlignment="Bottom" Click="btnIntervaloLoteSalvar_Click">
                        <Button.BorderBrush>
                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                <GradientStop Color="White" Offset="0" />
                                <GradientStop Color="#FF3CB8B3" Offset="0.461" />
                                <GradientStop Color="#FF177470" Offset="1" />
                            </LinearGradientBrush>
                        </Button.BorderBrush>
                    </Button>
                    <Button x:Name="btnIntervaloLoteNovo" Background="#FF3CB8B3" Content="Novo" Cursor="Hand" FontFamily="Segoe UI Semibold" FontSize="13.333" Foreground="#FF004B48" Height="26" Margin="22,0,451,30" Style="{StaticResource BotaoLogin}" VerticalAlignment="Bottom"
                            IsEnabled="{Binding Path=IsFiliada, ElementName=config, Mode=OneWay}" Click="btnIntervaloLoteNovo_Click">
                        <Button.BorderBrush>
                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                <GradientStop Color="White" Offset="0" />
                                <GradientStop Color="#FF3CB8B3" Offset="0.461" />
                                <GradientStop Color="#FF177470" Offset="1" />
                            </LinearGradientBrush>
                        </Button.BorderBrush>
                    </Button>
                    
                    <Button x:Name="btnConfiguracaoExcluir" Content="Excluir" Height="26" Margin="0,0,121,19" VerticalAlignment="Bottom" Cursor="Hand" Style="{StaticResource BotaoLogin}" Background="#FF3CB8B3" FontFamily="Segoe UI Semibold" FontSize="13.333" Foreground="#FF004B48" Width="75" HorizontalAlignment="Right"
                            IsEnabled="{Binding Path=IsFiliada, ElementName=config, Mode=OneWay}" Click="btnConfiguracaoExcluir_Click">
                        <Button.BorderBrush>
                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                <GradientStop Color="White" Offset="0"/>
                                <GradientStop Color="#FF3CB8B3" Offset="0.461"/>
                                <GradientStop Color="#FF177470" Offset="1"/>
                            </LinearGradientBrush>
                        </Button.BorderBrush>
                    </Button>
                    <Button x:Name="btnConfiguracaoCancelar" Content="Cancelar" Height="26" Margin="0,0,33,19" VerticalAlignment="Bottom" Cursor="Hand" Style="{StaticResource BotaoLogin}" Background="#FF3CB8B3" FontFamily="Segoe UI Semibold" FontSize="13.333" Foreground="#FF004B48" HorizontalAlignment="Right" Width="75"
                            IsEnabled="{Binding ElementName=config, Path=OperadoraPrestador, Converter={StaticResource nullToBoolConverter}}" Click="btnConfiguracaoCancelar_Click">
                        <Button.BorderBrush>
                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                <GradientStop Color="White" Offset="0"/>
                                <GradientStop Color="#FF3CB8B3" Offset="0.461"/>
                                <GradientStop Color="#FF177470" Offset="1"/>
                            </LinearGradientBrush>
                        </Button.BorderBrush>
                    </Button>
                    <TextBlock HorizontalAlignment="Left" Height="15" Margin="14,65,0,0" TextWrapping="Wrap" Text="Identificação da Operadora" VerticalAlignment="Top" Width="210"/>
                    <RadioButton x:Name="rdbCodigoOperadora" Content="Código da Operadora" HorizontalAlignment="Left" Height="18" Margin="22,86,0,0" VerticalAlignment="Top" Width="161"
                                 IsEnabled="{Binding ElementName=config, Path=OperadoraPrestador, Converter={StaticResource nullToBoolConverter}}" Click="rdb_Click" IsChecked="True"/>
                    <TextBox Height="23" Width="110" Margin="188,83,250,377" MaxLength="20" IsEnabled="{Binding ElementName=config, Path=IsCodigoNaOperadora}"
                             Text="{Binding ElementName=config, Path=OperadoraPrestador.CodigoNaOperadora, Mode=TwoWay}"/>
                    <sdk:TreeView x:Name="tvwOperadora" HorizontalAlignment="Right" Width="183" Margin="0,26,24,55" SelectedItemChanged="tvwOperadora_SelectedItemChanged"
                                  Style="{StaticResource TreeViewStyle}" ItemContainerStyle="{StaticResource ConnectingLinesTreeViewItem}">
                        <sdk:TreeViewItem x:Name="tviFiliadas" Header="Operadoras Filiadas" ItemsSource="{Binding Path=OperadorasFiliadas, ElementName=config, Mode=OneWay}"
                                          ItemContainerStyle="{StaticResource ConnectingLinesTreeViewItem}">
                            <sdk:TreeViewItem.ItemTemplate>
                                <DataTemplate>
                                    <TextBlock Text="{Binding Nome}"  />
                                </DataTemplate>
                            </sdk:TreeViewItem.ItemTemplate>
                        </sdk:TreeViewItem>
                        <sdk:TreeViewItem x:Name="tviNaoFiliadas" Header="Operadoras Não Filiadas" ItemsSource="{Binding Path=OperadorasNaoFiliadas, ElementName=config, Mode=OneWay}"
                                          ItemContainerStyle="{StaticResource ConnectingLinesTreeViewItem}">
                            <sdk:TreeViewItem.ItemTemplate>
                                <DataTemplate>
                                    <TextBlock Text="{Binding Nome}"  />
                                </DataTemplate>
                            </sdk:TreeViewItem.ItemTemplate>
                        </sdk:TreeViewItem>
                    </sdk:TreeView>
                    <TextBlock HorizontalAlignment="Right" Height="14" Margin="0,8,59,0" TextWrapping="Wrap" Text="Operadoras Filiadas" VerticalAlignment="Top" Width="148"/>
                    <RadioButton x:Name="rdbCPF" Content="CPF / CNPJ" HorizontalAlignment="Left" Height="18" Margin="22,110,0,0" VerticalAlignment="Top" Width="122"
                                 IsEnabled="{Binding ElementName=config, Path=OperadoraPrestador, Converter={StaticResource nullToBoolConverter}}" Click="rdb_Click"/>
                    <Button x:Name="btnConfiguracaoGravar" Content="Gravar" Height="26" Margin="223,0,250,330" VerticalAlignment="Bottom" Cursor="Hand" Style="{StaticResource BotaoLogin}" Background="#FF3CB8B3" FontFamily="Segoe UI Semibold" FontSize="13.333" Foreground="#FF004B48"
                            IsEnabled="{Binding ElementName=config, Path=OperadoraPrestador, Converter={StaticResource nullToBoolConverter}}" Click="btnConfiguracaoGravar_Click">
                        <Button.BorderBrush>
                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                <GradientStop Color="White" Offset="0"/>
                                <GradientStop Color="#FF3CB8B3" Offset="0.461"/>
                                <GradientStop Color="#FF177470" Offset="1"/>
                            </LinearGradientBrush>
                        </Button.BorderBrush>
                    </Button>
                    <TextBlock HorizontalAlignment="Left" Margin="14,167,0,300" TextWrapping="Wrap" Text="Intervalo de Lotes" Width="210"/>
                    <TextBlock HorizontalAlignment="Left" Margin="124,0,0,102" TextWrapping="Wrap" Text="De" Width="36" Height="15" VerticalAlignment="Bottom"/>
                    <TextBlock HorizontalAlignment="Left" Margin="215,0,0,102" TextWrapping="Wrap" Text="até" Width="36" Height="15" VerticalAlignment="Bottom"/>
                    <Path Data="M323,0 L323,482" Fill="White" HorizontalAlignment="Right" Margin="0,10.502,231,6.497" Stretch="Fill" Stroke="White" UseLayoutRounding="False" Width="1" Opacity="0.475" Height="443" Grid.ColumnSpan="2"/>

                    <ListBox x:Name="lbxIntervaloLote" HorizontalAlignment="Right" Width="281" Margin="0,0,245,126" Height="149" VerticalAlignment="Bottom"
                             ItemsSource="{Binding Path=IntervaloLoteLista, ElementName=config, Mode=OneWay}" SelectionChanged="lbxIntervaloLote_SelectionChanged">
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="102" />
                                        <ColumnDefinition Width="101" />
                                        <ColumnDefinition Width="58" />
                                    </Grid.ColumnDefinitions>
                                    <TextBlock Text="{Binding Inicio, Mode=OneWay}" Grid.Column="0" Margin="17,0,0,0" />
                                    <TextBlock Text="{Binding Fim, Mode=OneWay}" Grid.Column="1" Margin="17,0,0,0" />
                                    <TextBlock Text="{Binding Atual, Mode=OneWay}" Grid.Column="2" Margin="14,0,0,0" />
                                </Grid>
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>

                    <TextBlock Height="15" HorizontalAlignment="Left" Margin="206,0,0,72" Text="Atual" TextWrapping="Wrap" VerticalAlignment="Bottom" Width="50" />
                    
                    <TextBox Margin="147,0,0,97" Width="40" Height="23" VerticalAlignment="Bottom" HorizontalAlignment="Left" BindingValidationError="intervaloLote_BindingValidationError"
                        Text="{Binding Path=IntervaloLote.Inicio, ElementName=config, ValidatesOnExceptions=True, ValidatesOnDataErrors=True, NotifyOnValidationError=True, TargetNullValue='0', Mode=TwoWay}"
                        IsEnabled="{Binding Path=IntervaloLote, ElementName=config, Converter={StaticResource nullToBoolConverter}, Mode=OneWay}"/>
                    <TextBox Margin="239,0,0,97" Width="40" Height="23" VerticalAlignment="Bottom" HorizontalAlignment="Left" BindingValidationError="intervaloLote_BindingValidationError"
                        Text="{Binding Path=IntervaloLote.Fim, ElementName=config, ValidatesOnExceptions=True, ValidatesOnDataErrors=True, NotifyOnValidationError=True, TargetNullValue='0', Mode=TwoWay}"
                        IsEnabled="{Binding Path=IntervaloLote, ElementName=config, Converter={StaticResource nullToBoolConverter}, Mode=OneWay}"/>
                    <TextBox Margin="239,0,0,68" Width="40" Height="23" VerticalAlignment="Bottom" HorizontalAlignment="Left" BindingValidationError="intervaloLote_BindingValidationError"
                        Text="{Binding Path=IntervaloLote.Atual, ElementName=config, ValidatesOnExceptions=True, ValidatesOnDataErrors=True, NotifyOnValidationError=True, TargetNullValue='0', Mode=TwoWay}"
                        IsEnabled="{Binding Path=IntervaloLote, ElementName=config, Converter={StaticResource nullToBoolConverter}, Mode=OneWay}"/>
                    
                    <TextBlock Height="15" HorizontalAlignment="Left" Margin="36,0,0,281" Text="De" TextWrapping="Wrap" VerticalAlignment="Bottom" Width="36" />
                    <TextBlock Height="15" HorizontalAlignment="Left" Margin="139,0,0,281" Text="até" TextWrapping="Wrap" VerticalAlignment="Bottom" Width="36" />
                    <TextBlock Height="15" HorizontalAlignment="Left" Margin="238,0,0,281" Text="Atual" TextWrapping="Wrap" VerticalAlignment="Bottom" Width="50" />
                </Grid>
            </controls:TabItem>
        </controls:TabControl>
    </Grid>
 </controls:ChildWindow>